<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../../include.inc.jsp"%>
<div class="row">
	<div class="col-lg-12">
		<div class="widget-box transparent" id="divSearch1">
			<div class="widget-body">
				<div class="widget-main">
					<form  name="frmSearch" id="frmSearch1" target="_self"  class="form-inline searchCondition">
	                    <!-- 数据权限 begion-->
	                    <c:if test="${organizationId != 1}"><input type="hidden" name="search_EQ_organization.id" value="${organizationId }"/></c:if>
	                    <!-- 数据权限 end-->
<!-- 	                    <input type="text" name="search_EQ_hospital.id"/> -->
						<label>
							科室名称:&nbsp;<input name="search_LIKE_name" class="form-control" placeholder="请输入医院科室" type="text">
						</label>
						<button id="btnSearch1" type="button" class="btn btn-primary btn-sm form-control">
							<i class="ace-icon fa fa-search icon-on-right bigger-110"></i>
						</button>
					</form>
				</div>
			</div>
		</div>
		<div id="tbWidget1" class="widget-box transparent ui-sortable-handle">
			<div class="widget-body">
				<div class="widget-main no-padding">
					<table id="table-data1" data-single-select=“true”
						data-classes="table table-striped table-hover" 
						   data-pagination="true"
					       data-id-field="id"
					       data-unique-id="id"
					       data-sort-name="createTime"
					       data-sort-order="asc">
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
var scripts = [];
$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
	var ajaxListUrl = contextPath + '/manage/ordering/department/list';
	
    var columns = [ {
        field : 'state',
        checkbox : true,
        title : "选择"
    }, {
        field : 'name',
        sortable : false,
        title : "科室名称"
    }, {
        field : 'code',
        sortable : false,
        title : "科室编码"
    }, {
        field : 'cardNo',
        sortable : false,
        title : "TV智能卡"
    }, {
//         field : 'remark',
//         sortable : false,
//         title : "科室介绍"
//     }, {
        field : 'hospital.name',
        sortable : false,
        title : "所属医院"
    }
    ];

	jQuery(function($) {
        initTable('table-data1', columns, ajaxListUrl, 'frmSearch1');
		// 搜索域控制
		$('#frmSearch1').find('#btnSearch1').on('click', function() {
			$('#table-data1').bootstrapTable('selectPage', 1);
		});

		$('#tbWidget1').on('reload.ace.widget', function(ev) {
			$('#table-data1').bootstrapTable('refresh', { silent : true });
		});
	});
});
</script>